$(function () {
    findTopAndFootData();
});

function findTopAndFootData() {
    let data = myAjax("/findTopAndFootData", {}, "get");
    setCompanyData(data.companyModel);
    setNavData(data.navArray);

}

function setCompanyData(data) {
    $("#logo").html(data.logo);
    $("#phone").html(data.phone + "a");
    $("#net").html("网址:" + data.net);
}

function setNavData(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += ' <div><a href="' + data[i].href + '">' + data[i].title + '</a> </div>';
    }
    $("#nav").html(html);
}